/**
 * @CommonDaoImpl.java
 * Copyright (c) 2010, Strong. All Rights Reserved.
 */
package cn.strong.scweb.common.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import cn.strong.scweb.common.dao.CommonDao;

/**
 * 
 * 
 * @author lilanfei
 * @version 1.0
 * @since 2010/02/04
 */
public class CommonDaoImpl extends SqlMapClientDaoSupport implements CommonDao {

    /* (non-Javadoc)
     * @see cn.strong.scweb.common.dao.CommonDao#selectObj(java.lang.String, java.lang.Object)
     */
    public Object selectObj(String method, Object para) {
        return getSqlMapClientTemplate().queryForObject(method, para);
    }

    /* (non-Javadoc)
     * @see cn.strong.scweb.common.dao.CommonDao#selectList(java.lang.String, java.lang.Object)
     */
    @SuppressWarnings("unchecked")
    public List<Object> selectList(String method, Object para) {
        return getSqlMapClientTemplate().queryForList(method, para);
    }

    /* (non-Javadoc)
     * @see cn.strong.scweb.common.dao.CommonDao#selectCount(java.lang.String, java.lang.Object)
     */
    public int selectCount(String method, Object para) {
        // TODO Auto-generated method stub
        return 0;
    }

    /* (non-Javadoc)
     * @see cn.strong.scweb.common.dao.CommonDao#update(java.lang.String, java.lang.Object)
     */
    public int update(String method, Object para) {
        return getSqlMapClientTemplate().update(method, para);
    }

    /* (non-Javadoc)
     * @see cn.strong.scweb.common.dao.CommonDao#insert(java.lang.String, java.lang.Object)
     */
    public void insert(String method, Object para) {
        getSqlMapClientTemplate().insert(method, para);
    }
}